

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>read_data command &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>read_data command</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/read_data.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="read-data-command">
<span id="index-0"></span><h1>read_data command<a class="headerlink" href="#read-data-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>read_data file keyword args ...
</pre></div>
</div>
<ul class="simple">
<li>file = name of data file to read in</li>
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>fix</em></li>
</ul>
<pre class="literal-block">
<em>fix</em> args = fix-ID header-string section-string
  fix-ID = ID of fix to process header lines and sections of data file
  header-string = header lines containing this string will be passed to fix
  section-string = section names with this string will be passed to fix
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>read_data data.lj
read_data ../run7/data.polymer.gz
read_data data.protein fix mycmap crossterm CMAP
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Read in a data file containing information LIGGGHTS(R)-PUBLIC needs to run a
simulation.  The file can be ASCII text or a gzipped text file
(detected by a .gz suffix).  This is one of 3 ways to specify initial
atom coordinates; see the <a class="reference internal" href="read_restart.html"><em>read_restart</em></a> and
<a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a> commands for alternative methods.</p>
<p>The structure of the data file is important, though many settings and
sections are optional or can come in any order.  See the examples
directory for sample data files for different problems.</p>
<p>A data file has a header and a body.  The header appears first.  The
first line of the header is always skipped; it typically contains a
description of the file.  Then lines are read one at a time.  Lines
can have a trailing comment starting with &#8216;#&#8217; that is ignored.  If the
line is blank (only whitespace after comment is deleted), it is
skipped.  If the line contains a header keyword, the corresponding
value(s) is read from the line.  If it doesn&#8217;t contain a header
keyword, the line begins the body of the file.</p>
<p>The body of the file contains zero or more sections.  The first line
of a section has only a keyword.  The next line is skipped.  The
remaining lines of the section contain values.  The number of lines
depends on the section keyword as described below.  Zero or more blank
lines can be used between sections.  Sections can appear in any order,
with a few exceptions as noted below.</p>
<p>The keyword <em>fix</em> can be used one or more times.  Each usage specifies
a fix that will be used to process a specific portion of the data
file.  Any header line containing <em>header-string</em> and any section with
a name containing <em>section-string</em> will be passed to the specified
fix.  See the <code class="xref doc docutils literal"><span class="pre">fix</span> <span class="pre">property/atom</span></code> command for
an example of a fix that operates in this manner.  The doc page for
the fix defines the syntax of the header line(s) and section(s) that
it reads from the data file.  Note that the <em>header-string</em> can be
specified as NULL, in which case no header lines are passed to the
fix.  This means that it can infer the length of its Section from
standard header settings, such as the number of atoms.</p>
<p>The formatting of individual lines in the data file (indentation,
spacing between words and numbers) is not important except that header
and section keywords (e.g. atoms, xlo xhi, Masses, Bond Coeffs) must
be capitalized as shown and can&#8217;t have extra white space between their
words - e.g. two spaces or a tab between the 2 words in &#8220;xlo xhi&#8221; or
the 2 words in &#8220;Bond Coeffs&#8221;, is not valid.</p>
<hr class="docutils" />
<p>These are the recognized header keywords.  Header lines can come in
any order.  The value(s) are read from the beginning of the line.
Thus the keyword <em>atoms</em> should be in a line like &#8220;1000 atoms&#8221;; the
keyword <em>ylo yhi</em> should be in a line like &#8220;-10.0 10.0 ylo yhi&#8221;; the
keyword <em>xy xz yz</em> should be in a line like &#8220;0.0 5.0 6.0 xy xz yz&#8221;.
All these settings have a default value of 0, except the lo/hi box
size defaults are -0.5 and 0.5.  A line need only appear if the value
is different than the default.</p>
<ul class="simple">
<li><em>atoms</em> = # of atoms in system</li>
<li><em>bonds</em> = # of bonds in system</li>
<li><em>atom types</em> = # of atom types in system</li>
<li><em>bond types</em> = # of bond types in system</li>
<li><em>extra bond per atom</em> = leave space for this many new bonds per atom</li>
<li><em>ellipsoids</em> = # of ellipsoids in system</li>
<li><em>lines</em> = # of line segments in system</li>
<li><em>xlo xhi</em> = simulation box boundaries in x dimension</li>
<li><em>ylo yhi</em> = simulation box boundaries in y dimension</li>
<li><em>zlo zhi</em> = simulation box boundaries in z dimension</li>
<li><em>xy xz yz</em> = simulation box tilt factors for triclinic system</li>
</ul>
<p>The initial simulation box size is determined by the lo/hi settings.
In any dimension, the system may be periodic or non-periodic; see the
<a class="reference internal" href="boundary.html"><em>boundary</em></a> command.</p>
<p>If the <em>xy xz yz</em> line does not appear, LIGGGHTS(R)-PUBLIC will set up an
axis-aligned (orthogonal) simulation box.  If the line does appear,
LIGGGHTS(R)-PUBLIC creates a non-orthogonal simulation domain shaped as a
parallelepiped with triclinic symmetry.  The parallelepiped has its
&#8220;origin&#8221; at (xlo,ylo,zlo) and is defined by 3 edge vectors starting
from the origin given by A = (xhi-xlo,0,0); B = (xy,yhi-ylo,0); C =
(xz,yz,zhi-zlo).  <em>Xy,xz,yz</em> can be 0.0 or positive or negative values
and are called &#8220;tilt factors&#8221; because they are the amount of
displacement applied to faces of an originally orthogonal box to
transform it into the parallelepiped.</p>
<p>The tilt factors (xy,xz,yz) can not skew the box more than half the
distance of the corresponding parallel box length.  For example, if
xlo = 2 and xhi = 12, then the x box length is 10 and the xy tilt
factor must be between -5 and 5.  Similarly, both xz and yz must be
between -(xhi-xlo)/2 and +(yhi-ylo)/2.  Note that this is not a
limitation, since if the maximum tilt factor is 5 (as in this
example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
... are all geometrically equivalent.</p>
<p>See <a class="reference internal" href="Section_howto.html#howto-7"><span>Section_howto 12</span></a> of the doc pages
for a geometric description of triclinic boxes, as defined by LIGGGHTS(R)-PUBLIC,
and how to transform these parameters to and from other commonly used
triclinic representations.</p>
<p>When a triclinic system is used, the simulation domain must be
periodic in any dimensions with a non-zero tilt factor, as defined by
the <a class="reference internal" href="boundary.html"><em>boundary</em></a> command.  I.e. if the xy tilt factor is
non-zero, then both the x and y dimensions must be periodic.
Similarly, x and z must be periodic if xz is non-zero and y and z must
be periodic if yz is non-zero.  Also note that if your simulation will
tilt the box, e.g. via the <a class="reference internal" href="fix_deform.html"><em>fix deform</em></a> command, the
simulation box must be defined as triclinic, even if the tilt factors
are initially 0.0.</p>
<p>For 2d simulations, the <em>zlo zhi</em> values should be set to bound the z
coords for atoms that appear in the file; the default of -0.5 0.5 is
valid if all z coords are 0.0.  For 2d triclinic simulations, the xz
and yz tilt factors must be 0.0.</p>
<p>If the system is periodic (in a dimension), then atom coordinates can
be outside the bounds (in that dimension); they will be remapped (in a
periodic sense) back inside the box.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If the system is non-periodic (in a dimension), then
all atoms in the data file must have coordinates (in that dimension)
that are &#8220;greater than or equal to&#8221; the lo value and &#8220;less than or
equal to&#8221; the hi value.  If the non-periodic dimension is of style
&#8220;fixed&#8221; (see the <a class="reference internal" href="boundary.html"><em>boundary</em></a> command), then the atom
coords must be strictly &#8220;less than&#8221; the hi value, due to the way
LIGGGHTS(R)-PUBLIC assign atoms to processors.  Note that you should not make the
lo/hi values radically smaller/larger than the extent of the atoms.
For example, if your atoms extend from 0 to 50, you should not specify
the box bounds as -10000 and 10000.  This is because LIGGGHTS(R)-PUBLIC uses the
specified box size to layout the 3d grid of processors.  A huge
(mostly empty) box will be sub-optimal for performance when using
&#8220;fixed&#8221; boundary conditions (see the <a class="reference internal" href="boundary.html"><em>boundary</em></a>
command).  When using &#8220;shrink-wrap&#8221; boundary conditions (see the
<a class="reference internal" href="boundary.html"><em>boundary</em></a> command), a huge (mostly empty) box may cause
a parallel simulation to lose atoms the first time that LIGGGHTS(R)-PUBLIC
shrink-wraps the box around the atoms.</p>
</div>
<p>The &#8220;extra bond per atom&#8221; setting should be used if new bonds will be
added to the system when a simulation runs, e.g. by using the <a class="reference internal" href="fix_bond_create.html"><em>fix bond/create</em></a> command.  This will pre-allocate
space in LIGGGHTS(R)-PUBLIC data structures for storing the new bonds.</p>
<hr class="docutils" />
<p>These are the section keywords for the body of the file.</p>
<ul class="simple">
<li><em>Atoms, Velocities, Masses, Ellipsoids, Lines</em> = atom-property sections</li>
<li><em>Bonds</em> = molecular topology sections</li>
<li><em>Pair Coeffs, PairIJ Coeffs, Bond Coeffs</em> = force field sections</li>
<li><em>BondBond Coeffs, BondAngle Coeffs, MiddleBondTorsion Coeffs,    EndBondTorsion Coeffs</em> = class 2 force field sections</li>
</ul>
<p>Each section is listed below in alphabetic order.  The format of each
section is described including the number of lines it must contain and
rules (if any) for where it can appear in the data file.</p>
<p>Any individual line in the various sections can have a trailing
comment starting with &#8220;#&#8221; for annotation purposes.  E.g. in the
Atoms section:</p>
<div class="highlight-python"><div class="highlight"><pre>10 1 17 -1.0 10.0 5.0 6.0   # salt ion
</pre></div>
</div>
<hr class="docutils" />
<p><em>Atoms</em> section:</p>
<ul class="simple">
<li>one line per atom</li>
<li>line syntax: depends on atom style</li>
</ul>
<p>An <em>Atoms</em> section must appear in the data file if natoms &gt; 0 in the
header section.  The atoms can be listed in any order.  These are the
line formats for each <a class="reference internal" href="atom_style.html"><em>atom style</em></a> in LIGGGHTS(R)-PUBLIC.  As
discussed below, each line can optionally have 3 flags (nx,ny,nz)
appended to it, which indicate which image of a periodic simulation
box the atom is in.  These may be important to include for some kinds
of analysis.</p>
<table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="83%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>bond</td>
<td>atom-ID molecule-ID atom-type x y z</td>
</tr>
<tr class="row-even"><td>ellipsoid</td>
<td>atom-ID atom-type ellipsoidflag density x y z</td>
</tr>
<tr class="row-odd"><td>sphere</td>
<td>atom-ID atom-type diameter density x y z</td>
</tr>
<tr class="row-even"><td>line</td>
<td>atom-ID molecule-ID atom-type lineflag density x y z</td>
</tr>
<tr class="row-odd"><td>molecular</td>
<td>atom-ID molecule-ID atom-type x y z</td>
</tr>
<tr class="row-even"><td>hybrid</td>
<td>atom-ID atom-type x y z sub-style1 sub-style2 ...</td>
</tr>
</tbody>
</table>
<p>The keywords have these meanings:</p>
<ul class="simple">
<li>atom-ID = integer ID of atom</li>
<li>molecule-ID = integer ID of molecule the atom belongs to</li>
<li>atom-type = type of atom (1-Ntype)</li>
<li>q = charge on atom (charge units)</li>
<li>diameter = diameter of spherical atom (distance units)</li>
<li>ellipsoidflag = 1 for ellipsoidal particles, 0 for point particles</li>
<li>lineflag = 1 for line segment particles, 0 for point particles</li>
<li>triangleflag = 1 for triangular particles, 0 for point particles</li>
<li>density = density of particle (mass/distance^3 or mass/distance^2 or mass/distance units, depending on dimensionality of particle)</li>
<li>mass = mass of particle (mass units)</li>
<li>volume = volume of particle (distance^3 units)</li>
<li>x,y,z = coordinates of atom</li>
</ul>
<p>The units for these quantities depend on the unit style; see the
<a class="reference internal" href="units.html"><em>units</em></a> command for details.</p>
<p>For 2d simulations specify z as 0.0, or a value within the <em>zlo zhi</em>
setting in the data file header.</p>
<p>The atom-ID is used to identify the atom throughout the simulation and
in dump files.  Normally, it is a unique value from 1 to Natoms for
each atom.  Unique values larger than Natoms can be used, but they
will cause extra memory to be allocated on each processor, if an atom
map array is used (see the <a class="reference internal" href="atom_modify.html"><em>atom_modify</em></a> command).
If an atom map array is not used (e.g. an atomic system with no
bonds), and velocities are not assigned in the data file, and you
don&#8217;t care if unique atom IDs appear in dump files, then the atom-IDs
can all be set to 0.</p>
<p>The molecule ID is a 2nd identifier attached to an atom.  Normally, it
is a number from 1 to N, identifying which molecule the atom belongs
to.  It can be 0 if it is an unbonded atom or if you don&#8217;t care to
keep track of molecule assignments.</p>
<p>The diameter specifies the size of a finite-size spherical particle.
It can be set to 0.0, which means that atom is a point particle.</p>
<p>The ellipsoidflag, lineflag, triangleflag determine
whether the particle is a finite-size ellipsoid or line or triangle or
body of finite size, or whether the particle is a point particle.
Additional attributes must be defined for each ellipsoid, line,
triangle, or body in the corresponding <em>Ellipsoids</em>, <em>Lines</em>,
<em>Triangles</em> section.</p>
<p>Some pair styles and fixes and computes that operate on finite-size
particles allow for a mixture of finite-size and point particles.  See
the doc pages of individual commands for details.</p>
<p>For finite-size particles, the density is used in conjunction with the
particle volume to set the mass of each particle as mass = density *
volume.  In this context, volume can be a 3d quantity (for spheres or
ellipsoids), a 2d quantity (for triangles), or a 1d quantity (for line
segments).  If the volume is 0.0, meaning a point particle, then the
density value is used as the mass.  One exception is for the body atom
style, in which case the mass of each particle (body or point
particle) is specified explicitly.  This is because the volume of the
body is unknown.</p>
<p>For atom_style hybrid, following the 5 initial values (ID,type,x,y,z),
specific values for each sub-style must be listed.  The order of the
sub-styles is the same as they were listed in the
<a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command.  The sub-style specific values
are those that are not the 5 standard ones (ID,type,x,y,z).  For
example, for the &#8220;charge&#8221; sub-style, a &#8220;q&#8221; value would appear.  For
the &#8220;full&#8221; sub-style, a &#8220;molecule-ID&#8221; and &#8220;q&#8221; would appear.  These are
listed in the same order they appear as listed above.  Thus if</p>
<div class="highlight-python"><div class="highlight"><pre>atom_style hybrid charge sphere
</pre></div>
</div>
<p>were used in the input script, each atom line would have these fields:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID atom-type x y z q diameter density
</pre></div>
</div>
<p>Note that if a non-standard value is defined by multiple sub-styles,
it must appear mutliple times in the atom line.  E.g. the atom line
for atom_style hybrid dipole full would list &#8220;q&#8221; twice:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID atom-type x y z q mux muy myz molecule-ID q
</pre></div>
</div>
<p>Atom lines (all lines or none of them) can optionally list 3 trailing
integer values: nx,ny,nz.  For periodic dimensions, they specify which
image of the simulation box the atom is considered to be in.  An image
of 0 means it is inside the box as defined.  A value of 2 means add 2
box lengths to get the true value.  A value of -1 means subtract 1 box
length to get the true value.  LIGGGHTS(R)-PUBLIC updates these flags as atoms
cross periodic boundaries during the simulation.  The flags can be
output with atom snapshots via the <a class="reference internal" href="dump.html"><em>dump</em></a> command.</p>
<p>If nx,ny,nz values are not set in the data file, LIGGGHTS(R)-PUBLIC initializes
them to 0.  If image information is needed for later analysis and they
are not all initially 0, it&#8217;s important to set them correctly in the
data file.  Also, if you plan to use the <a class="reference internal" href="replicate.html"><em>replicate</em></a>
command to generate a larger system, these flags must be listed
correctly for bonded atoms when the bond crosses a periodic boundary.
I.e. the values of the image flags should be different by 1 (in the
appropriate dimension) for the two atoms in such a bond.</p>
<p>Atom velocities and other atom quantities not defined above are set to
0.0 when the <em>Atoms</em> section is read.  Velocities can be set later by
a <em>Velocities</em> section in the data file or by a
<a class="reference internal" href="velocity.html"><em>velocity</em></a> or <a class="reference internal" href="set.html"><em>set</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>Bond Coeffs</em> section:</p>
<ul class="simple">
<li>one line per bond type</li>
<li>line syntax: ID coeffs</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = bond type (1-N)
coeffs = list of coeffs
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>4 250 1.49
</pre></div>
</div>
<p>The number and meaning of the coefficients are specific to the defined
bond style.  See the <a class="reference internal" href="bond_style.html"><em>bond_style</em></a> and
<a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a> commands for details.  Coefficients can
also be set via the <a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>BondBond Coeffs</em> section:</p>
<ul class="simple">
<li>one line per angle type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = angle type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">angle_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>BondBond13 Coeffs</em> section:</p>
<ul class="simple">
<li>one line per dihedral type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = dihedral type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">dihedral_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>Bonds</em> section:</p>
<ul class="simple">
<li>one line per bond</li>
<li>line syntax: ID type atom1 atom2</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = bond number (1-Nbonds)
type = bond type (1-Nbondtype)
atom1,atom2 = IDs of 1st,2nd atoms in bond
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 3 17 29
</pre></div>
</div>
<p>The <em>Bonds</em> section must appear after the <em>Atoms</em> section.  All values
in this section must be integers (1, not 1.0).</p>
<hr class="docutils" />
<p><em>Ellipsoids</em> section:</p>
<ul class="simple">
<li>one line per ellipsoid</li>
<li>line syntax: atom-ID shapex shapey shapez quatw quati quatj quatk</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>atom-ID = ID of atom which is an ellipsoid
shapex,shapey,shapez = 3 diameters of ellipsoid (distance units)
quatw,quati,quatj,quatk = quaternion components for orientation of atom
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 1 2 1 1 0 0 0
</pre></div>
</div>
<p>The <em>Ellipsoids</em> section must appear if <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> is used and any atoms are listed in the
<em>Atoms</em> section with an ellipsoidflag = 1.  The number of ellipsoids
should be specified in the header section via the &#8220;ellipsoids&#8221;
keyword.</p>
<p>The 3 shape values specify the 3 diameters or aspect ratios of a
finite-size ellipsoidal particle, when it is oriented along the 3
coordinate axes.  They must all be non-zero values.</p>
<p>The values <em>quatw</em>, <em>quati</em>, <em>quatj</em>, and <em>quatk</em> set the orientation
of the atom as a quaternion (4-vector).  Note that the shape
attributes specify the aspect ratios of an ellipsoidal particle, which
is oriented by default with its x-axis along the simulation box&#8217;s
x-axis, and similarly for y and z.  If this body is rotated (via the
right-hand rule) by an angle theta around a unit vector (a,b,c), then
the quaternion that represents its new orientation is given by
(cos(theta/2), a*sin(theta/2), b*sin(theta/2), c*sin(theta/2)).  These
4 components are quatw, quati, quatj, and quatk as specified above.
LIGGGHTS(R)-PUBLIC normalizes each atom&#8217;s quaternion in case (a,b,c) is not
specified as a unit vector.</p>
<p>The <em>Ellipsoids</em> section must appear after the <em>Atoms</em> section.</p>
<hr class="docutils" />
<p><em>EndBondTorsion Coeffs</em> section:</p>
<ul class="simple">
<li>one line per dihedral type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = dihedral type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">dihedral_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>Lines</em> section:</p>
<ul class="simple">
<li>one line per line segment</li>
<li>line syntax: atom-ID x1 y1 x2 y2</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>atom-ID = ID of atom which is a line segment
x1,y1 = 1st end point
x2,y2 = 2nd end point
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 1.0 0.0 2.0 0.0
</pre></div>
</div>
<p>The <em>Lines</em> section must appear if <a class="reference internal" href="atom_style.html"><em>atom_style line</em></a>
is used and any atoms are listed in the <em>Atoms</em> section with a
lineflag = 1.  The number of lines should be specified in the header
section via the &#8220;lines&#8221; keyword.</p>
<p>The 2 end points are the end points of the line segment.  The ordering
of the 2 points should be such that using a right-hand rule to cross
the line segment with a unit vector in the +z direction, gives an
&#8220;outward&#8221; normal vector perpendicular to the line segment.
I.e. normal = (c2-c1) x (0,0,1).  This orientation may be important
for defining some interactions.</p>
<p>The <em>Lines</em> section must appear after the <em>Atoms</em> section.</p>
<hr class="docutils" />
<p><em>Masses</em> section:</p>
<ul class="simple">
<li>one line per atom type</li>
<li>line syntax: ID mass</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = atom type (1-N)
mass = mass value
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>3 1.01
</pre></div>
</div>
<p>This defines the mass of each atom type.  This can also be set via the
<a class="reference internal" href="mass.html"><em>mass</em></a> command in the input script.  This section cannot be
used for atom styles that define a mass for individual atoms -
e.g. <a class="reference internal" href="atom_style.html"><em>atom_style sphere</em></a>.</p>
<hr class="docutils" />
<p><em>MiddleBondTorsion Coeffs</em> section:</p>
<ul class="simple">
<li>one line per dihedral type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = dihedral type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">dihedral_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>Pair Coeffs</em> section:</p>
<ul class="simple">
<li>one line per atom type</li>
<li>line syntax: ID coeffs</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = atom type (1-N)
coeffs = list of coeffs
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>3 0.022 2.35197 0.022 2.35197
</pre></div>
</div>
<p>The number and meaning of the coefficients are specific to the defined
pair style.  See the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> and
<a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> commands for details.  Since pair
coefficients for types I != J are not specified, these will be
generated automatically by the pair style&#8217;s mixing rule.  See the
individual pair_style doc pages and the <code class="xref doc docutils literal"><span class="pre">pair_modify</span> <span class="pre">mix</span></code> command for details.  Pair coefficients can also
be set via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>PairIJ Coeffs</em> section:</p>
<ul class="simple">
<li>one line per pair of atom types for all I,J with I &lt;= J</li>
<li>line syntax: ID1 ID2 coeffs</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID1 = atom type I = 1-N
ID2 = atom type J = I-N, with I &lt;= J
coeffs = list of coeffs
</pre></div>
</div>
<ul class="simple">
<li>examples:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>3 3 0.022 2.35197 0.022 2.35197
3 5 0.022 2.35197 0.022 2.35197
</pre></div>
</div>
<p>This section must have N*(N+1)/2 lines where N = # of atom types.  The
number and meaning of the coefficients are specific to the defined
pair style.  See the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> and
<a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> commands for details.  Since pair
coefficients for types I != J are all specified, these values will
turn off the default mixing rule defined by the pair style.  See the
individual pair_style doc pages and the <code class="xref doc docutils literal"><span class="pre">pair_modify</span> <span class="pre">mix</span></code> command for details.  Pair coefficients can also
be set via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>Triangles</em> section:</p>
<ul class="simple">
<li>one line per triangle</li>
<li>line syntax: atom-ID x1 y1 x2 y2</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>atom-ID = ID of atom which is a line segment
x1,y1,z1 = 1st corner point
x2,y2,z2 = 2nd corner point
x3,y3,z3 = 3rd corner point
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 0.0 0.0 0.0 2.0 0.0 1.0 0.0 2.0 1.0
</pre></div>
</div>
<p>The <em>Triangles</em> section must appear if <a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a> is used and any atoms are listed in the <em>Atoms</em>
section with a triangleflag = 1.  The number of lines should be
specified in the header section via the &#8220;triangles&#8221; keyword.</p>
<p>The 3 corner points are the corner points of the triangle.  The
ordering of the 3 points should be such that using a right-hand rule
to go from point1 to point2 to point3 gives an &#8220;outward&#8221; normal vector
to the face of the triangle.  I.e. normal = (c2-c1) x (c3-c1).  This
orientation may be important for defining some interactions.</p>
<p>The <em>Triangles</em> section must appear after the <em>Atoms</em> section.</p>
<hr class="docutils" />
<p><em>Velocities</em> section:</p>
<ul class="simple">
<li>one line per atom</li>
<li>line syntax: depends on atom style</li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="42%" />
<col width="58%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>all styles except those listed</td>
<td>atom-ID vx vy vz</td>
</tr>
<tr class="row-even"><td>electron</td>
<td>atom-ID vx vy vz ervel</td>
</tr>
<tr class="row-odd"><td>ellipsoid</td>
<td>atom-ID vx vy vz lx ly lz</td>
</tr>
<tr class="row-even"><td>sphere</td>
<td>atom-ID vx vy vz wx wy wz</td>
</tr>
<tr class="row-odd"><td>hybrid</td>
<td>atom-ID vx vy vz sub-style1 sub-style2 ...</td>
</tr>
</tbody>
</table>
<p>where the keywords have these meanings:</p>
<p>vx,vy,vz = translational velocity of atom
lx,ly,lz = angular momentum of aspherical atom
wx,wy,wz = angular velocity of spherical atom
ervel = electron radial velocity (0 for fixed-core):ul</p>
<p>The velocity lines can appear in any order.  This section can only be
used after an <em>Atoms</em> section.  This is because the <em>Atoms</em> section
must have assigned a unique atom ID to each atom so that velocities
can be assigned to them.</p>
<p>Vx, vy, vz, and ervel are in <a class="reference internal" href="units.html"><em>units</em></a> of velocity.  Lx, ly,
lz are in units of angular momentum (distance-velocity-mass).  Wx, Wy,
Wz are in units of angular velocity (radians/time).</p>
<p>For atom_style hybrid, following the 4 initial values (ID,vx,vy,vz),
specific values for each sub-style must be listed.  The order of the
sub-styles is the same as they were listed in the
<a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command.  The sub-style specific values
are those that are not the 5 standard ones (ID,vx,vy,vz).  For
example, for the &#8220;sphere&#8221; sub-style, &#8220;wx&#8221;, &#8220;wy&#8221;, &#8220;wz&#8221; values would
appear.  These are listed in the same order they appear as listed
above.  Thus if</p>
<div class="highlight-python"><div class="highlight"><pre>atom_style hybrid electron sphere
</pre></div>
</div>
<p>were used in the input script, each velocity line would have these
fields:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID vx vy vz ervel wx wy wz
</pre></div>
</div>
<p>Translational velocities can also be set by the
<a class="reference internal" href="velocity.html"><em>velocity</em></a> command in the input script.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>To read gzipped data files, you must compile LIGGGHTS(R)-PUBLIC with the
-DLAMMPS_GZIP option - see the <a class="reference internal" href="Section_start.html#start-2"><span>Making LIGGGHTS(R)-PUBLIC</span></a> section of the documentation.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="read_dump.html"><em>read_dump</em></a>, <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>,
<a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a>, <a class="reference internal" href="write_data.html"><em>write_data</em></a></p>
<p><strong>Default:</strong> none</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>